ShowExceptionMessage

Prototype:

procedure ShowExceptionMessage;

Description:

Shows the message associated with the current exception in a message box. This function should only be called from within an except section, or a function called from an except section.

Remarks:

If logging is enabled (via the /LOG switch) the message will recorded in the log in addition to being shown.

Example:
var
  I: Integer;
begin
  I := 1;
  try
    // The following line will raise a "Division by zero" exception
    I := I div 0;
  except
    // Catch the exception, show it, and continue
    ShowExceptionMessage;
  end;
end;